drop table if exists jms_dwd.dwd_tms_trunk_oper_summary_dt;
create external table jms_dwd.dwd_tms_trunk_oper_summary_dt
(
    shipment_no            string comment '任务编号',
    shipment_name          string comment '任务名称',
    setout_arrive_sitename string comment '任务拆分名称',
    setout_sitename        string comment '发出中心	',
    setout_sitecode       string comment '发出中心编码',
    arrive_sitename        string comment '到达中心	',
    arrive_sitecode        string comment '到达中心编码',
    tickets                int comment '票数',
    packages               int comment '袋数',
    bulks                  int comment '散件数',
    pkg_bulks              int comment '袋数与散件数之和',
    min_operation_duration double comment '最小操作时长',
    max_operation_duration double comment '最大操作时长',
    avg_operation_duration double comment '平均操作时长'
)
    comment '干线车辆操作时效汇总表'
    partitioned by (
        dt string comment '到车日期 (yyyy-mm-dd)')
    stored as parquet
    location '/dw/hive/jms_dwd.db/external/dwd_tms_trunk_oper_summary_dt'
    tblproperties (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );
msck repair table jms_dwd.dwd_tms_trunk_oper_summary_dt;